import 'package:flutter/material.dart';

class LabelBelowIcon extends StatelessWidget {
  final label;
  final IconData icon;
  final Color iconColor;
  final GestureTapCallback onPressed;
  final Color circleColor;
  final bool isCircleEnabled;
  final double betweenHeight;

  LabelBelowIcon(
  {this.label,required this.icon,this.iconColor = Colors.grey,required this.onPressed,this.circleColor = Colors.white,this.isCircleEnabled = false,this.betweenHeight = 5.0}
      );

  @override
  Widget build(BuildContext context) {
    return InkWell(
      onTap: ()=>onPressed,
      child: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        crossAxisAlignment: CrossAxisAlignment.center,
        children:<Widget>[
          isCircleEnabled ?
              CircleAvatar(
                backgroundColor:circleColor,
                radius:20.0,
                child: Icon(
                  icon,
                  size:12.0,
                  color: iconColor,
                ),
              )
          : Icon(icon,size:23.0,color:iconColor,),
          SizedBox(
            height:betweenHeight,
          ),
          Text(
            label,
            textAlign: TextAlign.center,
            style: const TextStyle(fontFamily:"Raleway"),
          ),
        ],
      ),
    );
  }
}
